package com.woniuxy.controller;

import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.RbacMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


// 该接口用于查询权限菜单信息

@RestController
@RequestMapping("/rbacMenu")
public class RbacMenuController {
    @Autowired
    RbacMenuService rbacMenuService;

    @RequestMapping("/findAll")
    public ResponseEntity findAll(){
        return   rbacMenuService.findAll();
    }

    @RequestMapping("/findByRoleId/{roleId}")
    public ResponseEntity findByRoleId(@PathVariable int roleId){
        return   rbacMenuService.findByRoleId(roleId);
    }
}
